#ifndef HTTP_POST_H
#define HTTP_POST_H

#include <QObject>
#include <QNetworkReply>
#include <QNetworkAccessManager>

#include "wx_api.h"

class Http_Post : public QObject
{
    Q_OBJECT
public:
    explicit Http_Post(QObject *parent = 0);
    virtual ~Http_Post();


    void post(QString url, QString str, bool needSetCookie = false);

protected:
    virtual void finished(QNetworkReply* reply) { Q_UNUSED(reply); }

private:
    QNetworkAccessManager m_nam;
    QMetaObject::Connection m_sslErrorConnection;
    QMetaObject::Connection m_finishConnection;
};

#endif // HTTP_POST_H
